<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/BSP/dev_io_spi.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_4ca18d753a70f6eada20fde478bd3fc8.html">BSP</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle"><div class="title">dev_io_spi.h 文件参考</div></div>
</div><!--header-->
<div class="contents">

<p>IO 模拟 SPI 通讯接口  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &quot;stdint.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
dev_io_spi.h 的引用(Include)关系图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io__spi_8h__incl.png" border="0" usemap="#a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io__spi_8h" alt=""/></div>
<map name="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io__spi_8h" id="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io__spi_8h">
<area shape="rect" title="IO 模拟 SPI 通讯接口" alt="" coords="5,5,228,75"/>
<area shape="rect" title=" " alt="" coords="84,123,149,148"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
此图展示该文件直接或间接的被哪些文件引用了:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io__spi_8h__dep__incl.png" border="0" usemap="#a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io__spi_8hdep" alt=""/></div>
<map name="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io__spi_8hdep" id="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io__spi_8hdep">
<area shape="rect" title="IO 模拟 SPI 通讯接口" alt="" coords="128,5,351,75"/>
<area shape="rect" href="dev__io__spi_8c.html" title="IO 模拟 SPI 通讯接口" alt="" coords="5,123,228,192"/>
<area shape="rect" href="_s_p_i___w_b25_qxx_8c.html" title="WB25Qxx SPI Flash 驱动程序" alt="" coords="252,123,475,192"/>
</map>
</div>
</div>
<p><a href="dev__io__spi_8h_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a16d2dfe6a5c03f49b9584239472f5c41"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8h.html#a16d2dfe6a5c03f49b9584239472f5c41">IO_SPI_CS_LOW</a> (void)</td></tr>
<tr class="memdesc:a16d2dfe6a5c03f49b9584239472f5c41"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 SPI 通讯的 CS 拉低  <a href="dev__io__spi_8h.html#a16d2dfe6a5c03f49b9584239472f5c41">更多...</a><br /></td></tr>
<tr class="separator:a16d2dfe6a5c03f49b9584239472f5c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97e76f9e7d5b3673003b3062b0982abb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8h.html#a97e76f9e7d5b3673003b3062b0982abb">IO_SPI_CS_HIGH</a> (void)</td></tr>
<tr class="memdesc:a97e76f9e7d5b3673003b3062b0982abb"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 SPI 通讯的 CS 拉高  <a href="dev__io__spi_8h.html#a97e76f9e7d5b3673003b3062b0982abb">更多...</a><br /></td></tr>
<tr class="separator:a97e76f9e7d5b3673003b3062b0982abb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5dc9bbf8a794391f1183411c047dfa2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8h.html#ae5dc9bbf8a794391f1183411c047dfa2">io_spi_init</a> (void)</td></tr>
<tr class="memdesc:ae5dc9bbf8a794391f1183411c047dfa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 SPI 通讯端口初始化  <a href="dev__io__spi_8h.html#ae5dc9bbf8a794391f1183411c047dfa2">更多...</a><br /></td></tr>
<tr class="separator:ae5dc9bbf8a794391f1183411c047dfa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb59768338d754f15de5d09e175fb3b8"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8h.html#adb59768338d754f15de5d09e175fb3b8">io_spi_readwrite</a> (uint32_t data, uint32_t bit_len)</td></tr>
<tr class="memdesc:adb59768338d754f15de5d09e175fb3b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟标准 SPI 通讯读写  <a href="dev__io__spi_8h.html#adb59768338d754f15de5d09e175fb3b8">更多...</a><br /></td></tr>
<tr class="separator:adb59768338d754f15de5d09e175fb3b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbe161ab6562f9da568695c02f71d18e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8h.html#acbe161ab6562f9da568695c02f71d18e">io_qspi_write</a> (uint32_t data, uint32_t bit_len)</td></tr>
<tr class="memdesc:acbe161ab6562f9da568695c02f71d18e"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 QSPI 通讯写  <a href="dev__io__spi_8h.html#acbe161ab6562f9da568695c02f71d18e">更多...</a><br /></td></tr>
<tr class="separator:acbe161ab6562f9da568695c02f71d18e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b9736b990d7b5ce371509d7edd35a70"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8h.html#a4b9736b990d7b5ce371509d7edd35a70">io_qspi_read</a> (uint32_t bit_len)</td></tr>
<tr class="memdesc:a4b9736b990d7b5ce371509d7edd35a70"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 QSPI 通讯读  <a href="dev__io__spi_8h.html#a4b9736b990d7b5ce371509d7edd35a70">更多...</a><br /></td></tr>
<tr class="separator:a4b9736b990d7b5ce371509d7edd35a70"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p >IO 模拟 SPI 通讯接口 </p>
<p >/ </p><dl class="section since"><dt>自从</dt><dd>Change Logs: Date Author Notes 2022-12-08 lzh the first version 2023-05-06 lzh add configuration options (CPOL / CPHA / SCK frequency) </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>/</dd></dl>
<dl class="section attention"><dt>注意</dt><dd></dd></dl>
<p>THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, SYNWIT SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONN- -ECTION WITH THEIR PRODUCTS.</p>
<dl class="section copyright"><dt>版权所有</dt><dd>2012 Synwit Technology </dd></dl>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8h_source.html">dev_io_spi.h</a> 中定义.</p>
</div><h2 class="groupheader">函数说明</h2>
<a id="a16d2dfe6a5c03f49b9584239472f5c41" name="a16d2dfe6a5c03f49b9584239472f5c41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16d2dfe6a5c03f49b9584239472f5c41">&#9670;&#160;</a></span>IO_SPI_CS_LOW()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void IO_SPI_CS_LOW </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>IO 模拟 SPI 通讯的 CS 拉低 </p>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00136">136</a> 行定义.</p>

</div>
</div>
<a id="a97e76f9e7d5b3673003b3062b0982abb" name="a97e76f9e7d5b3673003b3062b0982abb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97e76f9e7d5b3673003b3062b0982abb">&#9670;&#160;</a></span>IO_SPI_CS_HIGH()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void IO_SPI_CS_HIGH </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>IO 模拟 SPI 通讯的 CS 拉高 </p>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00144">144</a> 行定义.</p>

</div>
</div>
<a id="ae5dc9bbf8a794391f1183411c047dfa2" name="ae5dc9bbf8a794391f1183411c047dfa2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5dc9bbf8a794391f1183411c047dfa2">&#9670;&#160;</a></span>io_spi_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void io_spi_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IO 模拟 SPI 通讯端口初始化 </p>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00152">152</a> 行定义.</p>

</div>
</div>
<a id="adb59768338d754f15de5d09e175fb3b8" name="adb59768338d754f15de5d09e175fb3b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb59768338d754f15de5d09e175fb3b8">&#9670;&#160;</a></span>io_spi_readwrite()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t io_spi_readwrite </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bit_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IO 模拟标准 SPI 通讯读写 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>: 待发送数据 </td></tr>
    <tr><td class="paramname">bit_len</td><td>: 数据长度(/bit)&lt;不超过 32 bit&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">uint32_t</td><td>: 返回发送过程中接收到的数据 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00178">178</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io__spi_8h_adb59768338d754f15de5d09e175fb3b8_cgraph.png" border="0" usemap="#adev__io__spi_8h_adb59768338d754f15de5d09e175fb3b8_cgraph" alt=""/></div>
<map name="adev__io__spi_8h_adb59768338d754f15de5d09e175fb3b8_cgraph" id="adev__io__spi_8h_adb59768338d754f15de5d09e175fb3b8_cgraph">
<area shape="rect" title="IO 模拟标准 SPI 通讯读写" alt="" coords="5,5,120,31"/>
<area shape="rect" href="dev__io__spi_8c.html#a1ff4cee6a643c539fcad8e287445f95f" title="IO 模拟 SPI 通讯的时延" alt="" coords="168,5,263,31"/>
</map>
</div>

</div>
</div>
<a id="acbe161ab6562f9da568695c02f71d18e" name="acbe161ab6562f9da568695c02f71d18e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbe161ab6562f9da568695c02f71d18e">&#9670;&#160;</a></span>io_qspi_write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void io_qspi_write </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bit_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IO 模拟 QSPI 通讯写 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>: 待发送数据 </td></tr>
    <tr><td class="paramname">bit_len</td><td>: 数据长度(/bit)&lt;必须被 4 整除, 不超过 32 bit&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">/</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00228">228</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io__spi_8h_acbe161ab6562f9da568695c02f71d18e_cgraph.png" border="0" usemap="#adev__io__spi_8h_acbe161ab6562f9da568695c02f71d18e_cgraph" alt=""/></div>
<map name="adev__io__spi_8h_acbe161ab6562f9da568695c02f71d18e_cgraph" id="adev__io__spi_8h_acbe161ab6562f9da568695c02f71d18e_cgraph">
<area shape="rect" title="IO 模拟 QSPI 通讯写" alt="" coords="5,5,103,31"/>
<area shape="rect" href="dev__io__spi_8c.html#a1ff4cee6a643c539fcad8e287445f95f" title="IO 模拟 SPI 通讯的时延" alt="" coords="151,5,245,31"/>
</map>
</div>

</div>
</div>
<a id="a4b9736b990d7b5ce371509d7edd35a70" name="a4b9736b990d7b5ce371509d7edd35a70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b9736b990d7b5ce371509d7edd35a70">&#9670;&#160;</a></span>io_qspi_read()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t io_qspi_read </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bit_len</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IO 模拟 QSPI 通讯读 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">bit_len</td><td>: 数据长度(/bit)&lt;必须被 4 整除, 不超过 32 bit&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">uint32_t</td><td>: 返回接收到的数据 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00285">285</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io__spi_8h_a4b9736b990d7b5ce371509d7edd35a70_cgraph.png" border="0" usemap="#adev__io__spi_8h_a4b9736b990d7b5ce371509d7edd35a70_cgraph" alt=""/></div>
<map name="adev__io__spi_8h_a4b9736b990d7b5ce371509d7edd35a70_cgraph" id="adev__io__spi_8h_a4b9736b990d7b5ce371509d7edd35a70_cgraph">
<area shape="rect" title="IO 模拟 QSPI 通讯读" alt="" coords="5,5,100,31"/>
<area shape="rect" href="dev__io__spi_8c.html#a1ff4cee6a643c539fcad8e287445f95f" title="IO 模拟 SPI 通讯的时延" alt="" coords="148,5,243,31"/>
</map>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
